//
//  UITableViewCell+Category.m
//  CreditAddressBook
//
//  Created by Lee on 15/10/8.
//  Copyright © 2015年 Lee. All rights reserved.
//

#import "UITableViewCell+Category.h"

@implementation UITableViewCell (Category)

+ (instancetype)cellWithTableView:(UITableView *)tableView {
    NSString *nibName = [[NSStringFromClass(self) componentsSeparatedByString:@"."] lastObject];
    NSString *ID = nibName;
    Class className = NSClassFromString(nibName);
    if (className) {
        id cell = [tableView dequeueReusableCellWithIdentifier:ID];
        if (!cell) {
            cell = [[[NSBundle mainBundle] loadNibNamed:nibName owner:nil options:nil] lastObject];
        }
        return cell;
    }
    return nil;
}
@end
